#include "commonfunc.h"

CNS_INIT(CnsStandardItemModel)
CNS_REGISTER_COM_FACTORY(CnsStandardItemModel)
CNS_INIT_END

CNS_INIT(CnsNetworkAccessManager)
CNS_REGISTER_COM_FACTORY(CnsNetworkAccessManager)
CNS_INIT_END

CNS_INIT(CnsTimer)
CNS_REGISTER_COM_FACTORY(CnsTimer)
CNS_INIT_END

void uv_async_stop_loop(uv_async_t* handle)
{
    uv_loop_t* loop = reinterpret_cast<uv_loop_t*>(handle->data);
    uv_stop(loop);
    uv_close(reinterpret_cast<uv_handle_t*>(handle), nullptr);
}
